<div class="modal-header">
    <h3>Select Existing Content <i class="fa fa-times pull-right" ng-click="cancel()"></i></h3>
</div>
<div class="modal-body">
	<div class="accordian" ng-controller="contentListAccordion">
		<div class="filter row">
			<div class="col-sm-9">
				<div class="input-group">
						<span class="input-group-addon">Filter</span>
					<input class="form-control" ng-model="searchFilter" placeholder="Search to filter" />
				</div>
			</div>
			<div class="col-sm-3">
				<div class="input-group">
					<span class="input-group-addon">Limit</span>
					<input class="form-control" ng-model="searchLimit" ng-init="searchLimit = 25" type="number"/>
				</div>
			</div>
		</div>
		<accordion close-others="oneAtATime">
			<accordion-group ng-repeat="c in content | orderBy:'name' | filter:searchFilter | limitTo:searchLimit" is-open="isopen">
				<accordion-heading>
					<button class="btn btn-sm btn-default" ng-click="addContent(c)"><i class="fa fa-plus"></i></button>
					{{c.name}}
					<i class="expander pull-right fa button-heading" ng-class="{'fa-chevron-down': isopen, 'fa-chevron-right': !isopen}"></i>
				</accordion-heading>
				<div class="content">
					<div class="content-preview" ng-bind-html="loadHTML(c.content)"></div>
				</div>
			</accordion-group>
		</accordion>
	</div>
</div>